package cn.iocoder.yudao.module.trade.config;

import java.time.Duration;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author cai
 * @date 2024/04/03 14:09
 */
@Component
@ConfigurationProperties(prefix = "trade.order.mail")
@Data
public class TradeOrderMailConfig {

    private Boolean detailEnable = false;

    private String detailTemplateCode;

    private Boolean cdkEnable = false;

    private String cdkTemplateCode;

    private Boolean manualEnable = false;

    /**
     * 人工处理的订单超时提醒, 模板编号
     */
    private String manualOrderTemplateCode;

    /**
     * 待人工处理的订单, 超时时间
     */
    @NotNull(message = "待人工处理的订单, 超时时间")
    private Duration manualOrderTimeout = Duration.ofMinutes(10);

    /**
     * 人工处理的订单超时提醒, 接收人
     */
    private String manualOrderReceiver;

}
